#ifndef ROLLINGAUDIOINPUTDEVICE_H
#define ROLLINGAUDIOINPUTDEVICE_H

#include<QIODevice>
class RollingAudioInputDevice : public QIODevice
{
    Q_OBJECT
public:
    explicit RollingAudioInputDevice(QObject *parent = nullptr);

    static const int sampleCount = 800;
    const QVector<short>&data=m_buffer;
    const QVector<float>&dataF=m_fbuffer;

protected:
    qint64 readData(char *data, qint64 maxSize) override;
    qint64 writeData(const char *data, qint64 maxSize) override;

private:
    QVector<short> m_buffer;
    QVector<float> m_fbuffer;
};

#endif // ROLLINGAUDIOINPUTDEVICE_H
